package com.immediatus.options;

import android.location.Criteria;

public class LocationSensorOptions extends Criteria{
    private static final long MINIMUMTRIGGERTIME_DEFAULT = 1000;
    private static final long MINIMUMTRIGGERDISTANCE_DEFAULT = 10;

    private boolean _enabledOnly = true;
    private long _minimumTriggerTime = MINIMUMTRIGGERTIME_DEFAULT;
    private long _minimumTriggerDistance = MINIMUMTRIGGERDISTANCE_DEFAULT;

    public LocationSensorOptions(){
    }

    public LocationSensorOptions(final int accuracy_, final boolean altitudeRequired_, final boolean bearingRequired_, final boolean costAllowed_, final int powerRequirement_, final boolean speedRequired_, final boolean enabledOnly_, final long minimumTriggerTime_, final long minimumTriggerDistance_){
        this._enabledOnly = enabledOnly_;
        this._minimumTriggerTime = minimumTriggerTime_;
        this._minimumTriggerDistance = minimumTriggerDistance_;

        this.setAccuracy(accuracy_);
        this.setAltitudeRequired(altitudeRequired_);
        this.setBearingRequired(bearingRequired_);
        this.setCostAllowed(costAllowed_);
        this.setPowerRequirement(powerRequirement_);
        this.setSpeedRequired(speedRequired_);
    }

    public void setEnabledOnly(final boolean enabledOnly_){
        this._enabledOnly = enabledOnly_;
    }

    public boolean isEnabledOnly(){
        return this._enabledOnly;
    }

    public long getMinimumTriggerTime(){
        return this._minimumTriggerTime;
    }

    public void setMinimumTriggerTime(final long minimumTriggerTime_){
        this._minimumTriggerTime = minimumTriggerTime_;
    }

    public long getMinimumTriggerDistance(){
        return this._minimumTriggerDistance;
    }

    public void setMinimumTriggerDistance(final long minimumTriggerDistance_){
        this._minimumTriggerDistance = minimumTriggerDistance_;
    }
}
